﻿<%@ Page Language="c#" CodeBehind="DefineStyle.aspx.cs" AutoEventWireup="false" Inherits="UDS.SubModule.UnitiveDocument.DocumentFlowPages.DefineStylePage" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
  <title>DefineStyle</title>
  <uds:Style runat="server" Href="~/css/BasicLayout.css" />
</head>
<body>
  <form id="DefineStyle" method="post" runat="server">
  <uds:PageTitle runat="server" HintImage="~/DataImages/DocFlow.gif" Title="文档流转" />
  <div style="text-align: center;">
    <table style="border-collapse: collapse; border: 0;" cellspacing="0" cellpadding="0" width="100%" class="formtable">
      <tr>
        <td class="formlabel">字段名： </td>
        <td>
          <asp:DropDownList ID="ddlFieldName" runat="server" CssClass="shortInput" />
        </td>
        <td class="formlabel">宽度： </td>
        <td>
          <uds:IntegerTextBox runat="server" ID="tbWidth" Text="100" CssClass="shortInput" Required="true" InvalidFormatErrorMessage="请正确输入宽度" />
        </td>
      </tr>
      <tr>
        <td class="formlabel">字段意义： </td>
        <td>
          <uds:RequiredTextBox ID="tbFieldDescription" runat="server" CssClass="normalInput" Required="true" />
        </td>
        <td class="formlabel">高度： </td>
        <td>
          <uds:IntegerTextBox runat="server" ID="tbHeight" CssClass="shortInput" Text="20" Required="true" InvalidFormatErrorMessage="请正确输入高度" />
        </td>
      </tr>
      <tr>
        <td class="formlabel">参与判断： </td>
        <td>
          <uds:YesNoRadioButtonList runat="server" ID="evaluateField" ChooseYes="false" YesText="判断" NoText="不判断" />
          （参与判断的字段只能填写数字） </td>
        <td class="formlabel">位置： </td>
        <td>
          <uds:IntegerTextBox ID="tbPosition" runat="server" CssClass="shortInput" Text="0" Required="true" InvalidFormatErrorMessage="请正确输入位置" />
        </td>
      </tr>
      <tr>
        <td class="formlabel">内容： </td>
        <td>
          <uds:YesNoRadioButtonList runat="server" ID="multilineField" ChooseYes="false" YesText="多行" NoText="单行" />
        </td>
        <td class="formlabel">填表示例：</td>
        <td>
          <asp:TextBox ID="tbExample" runat="server" CssClass="normalInput" />
        </td>
      </tr>
      <tr>
        <td colspan="4" style="text-align: center;">
          <asp:Button ID="cmdAdd" runat="server" CssClass="ButtonCss" Text="添加" />
          <asp:Button ID="cmdUpdate" runat="server" CssClass="ButtonCss" Text="修改" />
          <asp:Button ID="cmdDelete" runat="server" CssClass="ButtonCss" Text="删除" />
          <uds:RedirectButton runat="server" CssClass="buttonCss" Text="返回" RedirectUrl="ManageStyle.aspx" />
        </td>
      </tr>
    </table>
    <p>
      &nbsp;
    </p>
    <asp:Repeater runat="server" ID="styleRepeater">
      <HeaderTemplate>
        <script type="text/javascript">
        function GotoStyleDescription(descriptionId) {
          window.location.href = "DefineStyle.aspx?StyleID=<%= CurrentFlowStyle.ID %>&DescriptionID=" + descriptionId;
        }
        </script>
        <div class="commonBg" style="height: 28px; line-height: 28px; vertical-align: middle; text-align: center;">
          自定义表单 (示例)
        </div>
        <table class="fixedTable" style="width: 800px;">
          <colgroup>
            <col style="width: 80px;" />
            <col style="width: 150px;" />
            <col style="width: 100%;" />
          </colgroup>
      </HeaderTemplate>
      <ItemTemplate>
        <tr>
          <td style="text-align: right;">
            <input type="radio" name="<%= styleRepeater.UniqueID %>_RB" id="<%= styleRepeater.ClientID %>_RB_<%# Container.ItemIndex %>" value="value" onclick="GotoStyleDescription(<%#((FlowStyleDescription)Container.DataItem).DescriptionID %>)" />
            <label for="<%= styleRepeater.ClientID %>_RB_<%# Container.ItemIndex %>">
              [修改]
            </label>
          </td>
          <td class="formlabel">
            <%# HttpUtility.HtmlEncode(((FlowStyleDescription)Container.DataItem).Description) %>
          </td>
          <td>
            <asp:TextBox runat="server" Enabled="false" Width="<%# ((FlowStyleDescription)Container.DataItem).Width %>" Height="<%# ((FlowStyleDescription)Container.DataItem).Height %>" TextMode="<%# ((FlowStyleDescription)Container.DataItem).Multiline ? TextBoxMode.MultiLine : TextBoxMode.SingleLine %>" CssClass="input3" />
            <%# HttpUtility.HtmlEncode(((FlowStyleDescription)Container.DataItem).Example) %>
          </td>
        </tr>
      </ItemTemplate>
      <FooterTemplate>
        <% if (!string.IsNullOrEmpty(CurrentFlowStyle.Template))
           { %>
        <tr>
          <td>&nbsp;</td>
          <td class="formlabel"><a href="<%= CurrentFlowStyle.TemplateFullVirtualPath %>">模板下载</a> </td>
          <td>
            <input type="file" runat="server" disabled="disabled" class="longInput" />
          </td>
        </tr>
        <% } %>
        </table>
      </FooterTemplate>
    </asp:Repeater>
  </div>
  </form>
</body>
</html>
